package com.jcfy.project.module.service.impl;

import java.util.List;
import com.jcfy.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.jcfy.project.module.mapper.TTeamMapper;
import com.jcfy.project.module.domain.TTeam;
import com.jcfy.project.module.service.ITTeamService;

/**
 * 团长(自提点)Service业务层处理
 *
 * @author jiangfeng
 * @date 2020-08-05
 */
@Service
public class TTeamServiceImpl implements ITTeamService {
    @Autowired
    private TTeamMapper tTeamMapper;

    /**
     * 查询团长(自提点)
     *
     * @param teamId 团长(自提点)ID
     * @return 团长(自提点)
     */
    @Override
    public TTeam selectTTeamById(Long teamId) {
        return tTeamMapper.selectTTeamById(teamId);
    }

    /**
     * 查询团长(自提点)列表
     *
     * @param tTeam 团长(自提点)
     * @return 团长(自提点)
     */
    @Override
    public List<TTeam> selectTTeamList(TTeam tTeam) {
        return tTeamMapper.selectTTeamList(tTeam);
    }

    /**
     * 新增团长(自提点)
     *
     * @param tTeam 团长(自提点)
     * @return 结果
     */
    @Override
    public int insertTTeam(TTeam tTeam) {
        tTeam.setCreateTime(DateUtils.getNowDate());
        return tTeamMapper.insertTTeam(tTeam);
    }

    /**
     * 修改团长(自提点)
     *
     * @param tTeam 团长(自提点)
     * @return 结果
     */
    @Override
    public int updateTTeam(TTeam tTeam) {
        tTeam.setUpdateTime(DateUtils.getNowDate());
        return tTeamMapper.updateTTeam(tTeam);
    }

    /**
     * 批量删除团长(自提点)
     *
     * @param teamIds 需要删除的团长(自提点)ID
     * @return 结果
     */
    @Override
    public int deleteTTeamByIds(Long[] teamIds) {
        return tTeamMapper.deleteTTeamByIds(teamIds);
    }

    /**
     * 删除团长(自提点)信息
     *
     * @param teamId 团长(自提点)ID
     * @return 结果
     */
    @Override
    public int deleteTTeamById(Long teamId) {
        return tTeamMapper.deleteTTeamById(teamId);
    }
}
